
/*****************************************************************/
/*****************************************************************/
///***     PolEx: Supplementary Appendix                     ***///
/*****************************************************************/
/*****************************************************************/


 use estimation_gamma_vars


/* create regime categories; log-transform */
 tab v2x_regime, gen(vdem_c)
gen vdem0=0
replace vdem0=0 if v2x_regime==1
replace vdem0=1 if v2x_regime==2
replace vdem0=1 if v2x_regime==3

gen logdurable=ln(durable)
gen logstate=ln(statehood)

 /*****************************************************************/
///***  Table 4: Political Experience: Quantity and Quality?    ***///
/*****************************************************************/

xi: poisson formalexperyears entrydem log10gdppclag growthlag entryage logstate i.iso3n
est store m31
xi: poisson formalexperyears polity2 personal militaryregime monarchy partyregime presidentcat log10gdppclag growthlag entryage logstate i.iso3n if sixcats!=.
est store m32
xi: probit polTopPost entrydem log10gdppclag growthlag entryage logstate i.iso3n
est store m33
xi: probit polTopPost polity2 personal militaryregime monarchy partyregime presidentcat log10gdppclag growthlag entryage logstate i.iso3n if sixcats!=.
est store m34
xi: probit polTopMinistry entrydem log10gdppclag growthlag entryage logstate i.iso3n
est store m35
xi: probit polTopMinistry polity2 personal militaryregime monarchy partyregime presidentcat log10gdppclag growthlag entryage logstate i.iso3n if sixcats!=.
est store m36
set matsize 800
estout m31 m32 m33 m34 m35 m36, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N  chi2, fmt(0 2) label(N  chi2)) starlevels(+ 0.10 ** 0.05 *** 0.001)



 /*****************************************************************/
///***      Table  5   Democracy                            ***///
/*****************************************************************/



xi: reg gamma entrydem i.iso3n
est store m1
xi: reg gamma entrydem0 i.iso3n
est store m2
xi: reg gamma polity2 i.iso3n
est store m3
xi: reg gamma e_chga_demo i.iso3n
est store m4
xi: reg gamma e_boix_regime i.iso3n
est store m5
xi: reg gamma vdem0 i.iso3n
est store m6
xi: reg gamma  vdem_c2 vdem_c3 vdem_c4 i.iso3n
est store m7
xi: reg gamma v2x_polyarchy i.iso3n
est store m8
estout m1 m2 m3 m4 m5 m6 m7 m8, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N  r2, fmt(0 2) label(N  r2)) starlevels(+ 0.10 ** 0.05 *** 0.001)



 /*****************************************************************/
///***      Table    7   with statehood, durable, age       ***///
/*****************************************************************/



xi: reg gamma entrydem log10gdppclag growthlag entryage logstate pop i.iso3n
est store m21
xi: reg gamma e_chga_demo log10gdppclag growthlag entryage logstate pop i.iso3n
est store m22
xi: reg gamma entrydem log10gdppclag growthlag entryage logdurable pop i.iso3n
est store m23
xi: reg gamma e_chga_demo log10gdppclag growthlag entryage logdurable pop i.iso3n
est store m24
estout m21 m22 m23 m24, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N  r2, fmt(0 2) label(N  r2)) starlevels(+ 0.10 ** 0.05 *** 0.001)









  /*****************************************************************/
///***  Table 8: Regime Types and Leaders Political Experience    ***///
/*****************************************************************/

xi: reg gamma presidential  i.iso3n if entrydem==1
est store m11
xi: reg gamma presidential log10gdppclag growthlag entryage statehood i.iso3n if entrydem==1
est store m12
xi: regress gamma personal militaryregime monarchy i.iso3n if dictator!="NA" & dictator!=""
est store m13
xi: regress gamma log10gdppclag growthlag entryage statehood personal militaryregime monarchy i.iso3n if dictator!="NA" & dictator!=""
est store m14
xi: regress gamma polity2 personal militaryregime monarchy partyregime presidentcat i.iso3n if sixcats!=.
est store m15
xi: regress gamma polity2 personal militaryregime monarchy partyregime presidentcat log10gdppclag growthlag entryage statehood i.iso3n if sixcats!=.
est store m16
estout m11 m12 m13 m14 m15 m16, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N  r2, fmt(0 2) label(N  r2)) starlevels(+ 0.10 ** 0.05 *** 0.001)




 /*****************************************************************/
///***   Table 9: military and coups    ***///
/*****************************************************************/


/* excluding  military regimes */
 xi: reg gamma entrydem  i.iso3n if sixcats!=3
 est store m21
/* excluding those who came in a coup */
gen entrycoup=0 if entrytype!=""
replace entrycoup=1 if entrytype=="coup"
xi: reg gamma entrydem  i.iso3n if entrycoup==0
 est store m22
  xi: reg gamma e_chga_demo  i.iso3n if sixcats!=3
   est store m23
 xi: reg gamma e_chga_demo  i.iso3n if entrycoup==0
   est store m24


estout m21 m23 m22 m24, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N  r2, fmt(0 2) label(N  r2)) starlevels(+ 0.10 ** 0.05 *** 0.001)

/*****************************************************************/
///***         Figure 6            ***///
/*****************************************************************/

gen newstate=0 if  statehood==0
replace newstate=1 if statehood>=1
label define newstate 0 "newly independent" 1 "with statehood"
label values newstate newstate

graph bar (mean) gamma, over(newstate, label(labsize(small))) over(entrydem) scheme(s1mono),

/*****************************************************************/
///***          Table 10             ***///
/*****************************************************************/

/* ttest of differences based on vdem */

tabstat gamma if starty>1991, by(v2x_regime)
tabstat gamma if starty<1991, by(v2x_regime)

gen coldwar=0
replace coldwar=1 if year<1992
/* tab v2x_regime, gen(vdem_c) */

ttest gamma if vdem_c1==1, by(coldwar)
ttest gamma if vdem_c2==1, by(coldwar)
ttest gamma if vdem_c3==1, by(coldwar)
ttest gamma if vdem_c4==1, by(coldwar)



//*************************************************************//
///******  Table 13: Descriptive Statistics  **************///
//*************************************************************//


sutex gamma entrydem polity2 ///
e_chga_demo e_boix_regime vdem0 v2x_polyarchy log10gdppclag growthlag entryage logstate pop logdurable ///
personal militaryregime monarchy partyregime formalexperyears polTopPost polTopMinistry, labels minmax


  /*****************************************************************/
///***        Figure 8: PolEx in Six Regimes                 ***///
/*****************************************************************/



#delimit ;
graph box  gamma,
over(sixcats, sort(1) ) bar(1,color(black))   marker(1, msymbol(o)  mlabsize(tiny))
ysize(4) xsize(6) ylabel(-2(1)2) scheme(s1mono) ytitle("PolEx") legend(label(1 " ") ///
             size(small) region(lstyle(none)))  text(-2.75 24 "Dictatorships", place(e)) ///
             text(-2.75 77 "Democracies", place(e)) graphregion(m(b+5)) ;
             
             
             
             
